<template>
  <div class="address">
    <div class="plus"></div>
    <van-nav-bar title="地址列表" left-text="返回" left-arrow @click-left="goBack" />
    <div class="content">
      <div class="bg"></div>
      <div class="box">
        <div class="list">
          <AdsList showEdit />
        </div>
      </div>
    </div>
    <van-button round color="#ff594d" block @click="addAddress">新增地址</van-button>
  </div>
</template>

<script>
import AdsList from '@/components/AdsList.vue';

export default {
  name: "Address",

  components: {
    AdsList
  },

  data() {
    return {
      empty: false
    }
  },

  methods: {
    checkEmpty(status) {
      console.log(1);
      console.log(status);
    },

    goBack() {
      this.$router.replace({name: 'User'});
    },

    addAddress() {
      this.$router.push({name: 'NewAddress'});
    }
  }
};
</script>

<style lang="less" scoped>
.van-nav-bar {
  /deep/.van-icon {
    color: #ffa341;
  }
  /deep/.van-nav-bar__text {
    color: #ffa341;
  }
  /deep/.van-nav-bar__title {
    color: #333;
  }
}

.address {
  display: flex;
  flex-direction: column;
  height: 100vh;
  .bg {
    width: 100%;
    height: 100px;
    background: #ff594d;
  }
  .content {
    overflow-y: auto;
    height: 100%;
    // flex: 1;
    // background: red;
  }
  .box {
    padding: 10px;
    font-size: 14px;
    .list {
      margin-top: -30px;
      padding: 10px;
      min-height: 100px;
    }
  }
}
</style>